﻿using Kingdee.BOS;
using Kingdee.BOS.App.Data;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace WSDZ.KM.ZH.SalInvoiceDownloadFile6
{
   public class K3LogHelper
    {
        public static void SKLog(Context ctx, string BillNo1, string BillNo2, string Msg1, string Msg2, bool status, string btype)
        {
            try
            {
                string sql = $@"/*dialect*/ insert into SiKuLog(BillNo1,BillNo2,Msg1,Msg2,[status],btype)
values('{BillNo1}','{BillNo2}',@Msg1,@Msg2,'{status}',@btype)";
                DBUtils.Execute(ctx, sql, new List<SqlParam>() {
                 new SqlParam("@Msg1",KDDbType.String,Msg1.ToStringV1()),
                 new SqlParam("@Msg2",KDDbType.String,Msg2.ToStringV1()),
                 new SqlParam("@btype",KDDbType.String,btype.ToStringV1()),
                });
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

    }
}
